﻿<?xml version="1.0" encoding="utf-8" ?>
<View
  xmlns="http://mobileui.codeplex.com/v1"
  xmlns:x="http://mobileui.codeplex.com/xaml"
  xmlns:Controls="System.Windows.Forms,System.Windows.Forms"
  DesiredSize="Unbound">

  <View.MenuBar>
    <MenuBar>
      <MenuBar.MenuItems>
        <MenuBarItem Text="Back" Command="{Binding BackCommand}"/>
      </MenuBar.MenuItems>
    </MenuBar>
  </View.MenuBar>

  <GradientRectangleElement DesiredSize="Unbound" StartColor="240,240,240" EndColor="255,255,70"/>

  <TextElement DesiredSize="Unbound" Foreground="200,200,200" Text="WinForms Interop Demo" Angle="315" AutoSize="True" HorizontalAlignment="Center" VerticalAlignment="Center"/>

  <DrawingPanel DesiredSize="Unbound">

    <DrawingPanel.LayoutEngine>
      <StackLayout Padding="4" Margin="4"/>
    </DrawingPanel.LayoutEngine>

    <FormHost DesiredSize="UnboundAxis, 40">
      <FormHost.HostedControl>
        <Controls:TextBox Text="System.Windows.Forms.TextBox"/>
      </FormHost.HostedControl>
    </FormHost>

    <FormHost DesiredSize="UnboundAxis, 40">
      <FormHost.HostedControl>
        <Controls:ProgressBar Minimum="0" Maximum="10" Value="7"/>
      </FormHost.HostedControl>
    </FormHost>

    <FormHost DesiredSize="UnboundAxis, 40">
      <FormHost.HostedControl>
        <Controls:CheckBox Text="Don't click me!"/>
      </FormHost.HostedControl>
    </FormHost>

    <FormHost DesiredSize="UnboundAxis, 40">
      <FormHost.HostedControl>
        <Controls:TextBox Text="WinForms TextBox"/>
      </FormHost.HostedControl>
    </FormHost>

  </DrawingPanel>
  
</View>
